<extend name="Public/base"/>

<block name="body">
  <!-- 标题 -->
  <div class="main-title">
    <h2>退款列表</h2>
  </div>

  <!-- 数据表格 -->
  <div class="data-table">
    <table>
      <thead>
        <tr>
          <th>ID</th>
          <th>退款订单ID</th>
          <th>用户UID</th>
          <th>支付方式</th>
          <th>退款金额</th>
          <th>退款订单号</th>
          <th>退款订单类型</th>
          <th>交易订单号</th>
          <th>添加时间</th>
          <th>处理状态</th>
          <th>平台确认</th>
          <th width="150">操作</th>
        </tr>
      </thead>
      <tbody>
        <notempty name="_list">
          <volist name="_list" id="vo">
            <tr>
              <td>{$vo.id}</td>
              <td>{$vo.order_id}
              <eq name='vo.type' value='1'>
               <a href="{:U('Order/view', array('id' => $vo['order_id']))}" target="_blank">[订单详情]</a>
              </eq>
               </td>
              <td><a href="{:U('User/view', array('id' => $vo['uid']))}">{$vo.uid}</td>
              <td>{$vo.payment_type_text}</td>
              <td>{$vo.amount} 元</td>
              <td>{$vo.refund_no}</td>
              <td>{$vo.refund_type_text}</td>
              <td>{$vo.trade_no}</td>
              <td>{$vo.create_time|time_format}</td>
              <td>{$vo.seller_status_text}</td>
              <td>{$vo.refund_status_text}</td>
              <td>
                <if condition="$vo.seller_status eq 1">
                  <a href="{:U('audit?id='.$vo['id'].'&status=2')}" class="confirm ajax-get">[同意]</a>
                  <a href="{:U('audit?id='.$vo['id'].'&status=3')}" class="confirm ajax-get">[拒绝]</a>
                <elseif condition="$vo.refund_status eq 2"/>
                    <span class="text-cancel">待管理员处理</span>
                <elseif condition="$vo.refund_status eq 3"/>
                    <span class="text-cancel">已退款完毕</span>
                </if>
              </td>
            </tr>
          </volist>
        <else/>
          <tr><td colspan="11" class="text-center">暂无退款记录!</td></tr>
        </notempty>
      </tbody>
    </table> 
  </div>

  <!-- 分页 -->
  <div class="page">
    {$_page}
  </div>
</block>

<block name="script">
  <script type="text/javascript">
    //导航高亮
    highlight_subnav("{:U('Refund/index')}");
  </script>
</block>